import request from '@/utils/request'

// 查询流程定义列表
export function listDefinition(query) {
  return request({
    url: '/activiti/definition/list',
    method: 'post',
    params: query
  })
}

// 删除流程定义
export function removeDefinition(param) {
  return request({
    url: '/activiti/definition/remove',
    method: 'post',
    params: param
  })
}

// 流程定义转模型
export function convertDefinition(param) {
  return request({
    url: '/activiti/definition/convert2Model',
    method: 'post',
    params: param
  })
}
// 激活或挂起流程定义
export function suspendOrActiveDefinition(param) {
  return request({
    url: '/activiti/definition/suspendOrActiveApply',
    method: 'post',
    params: param
  })
}
// 审批历史列表
export function listHistory(instanceId) {
  return request({
    url: '/activiti/process/listHistory',
    method: 'post',
    params: instanceId
  })
}
// 查看高亮图
export function readresourceLeave(query) {
  return request({
    url: '/activiti/process/read-resource',
    method: 'post',
    params: query
  })
}